package com.zxl.feign;

import com.zxl.feign.impl.GoodsTypeFeignImpl;
import com.zxl.vo.Goods;
import com.zxl.vo.GoodsType;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @packageName com.zxl.feign
 * @ClassName
 * @Author zxl
 * @Description //TODO
 * @date
 **/
@FeignClient(
        value = "goods",
        fallback = GoodsTypeFeignImpl.class
)
public interface GoodsFeign {

    @RequestMapping("/goodstype/list")
    List<GoodsType> list();

    @PostMapping("/goodstype/updateGoodsType")
    boolean updateGoodsType(@RequestBody GoodsType goodsType);

    @RequestMapping("/goodstype/deleteGoodsTypeById")
    boolean deleteGoodsTypeById(@RequestParam("id") Integer id);

    @PostMapping("/goodstype/addGoodsType")
    boolean addGoodsType(@RequestBody GoodsType goodsType);

    @RequestMapping("/goods/list")
    List<Goods> goodsList();


    @RequestMapping("/goodstype/findGoodsTypeByPid")
    List<GoodsType> findGoodsTypeById(@RequestParam("pid") Integer pid);

    @PostMapping("/goods/add")
    Goods addGoods(@RequestBody Goods goods);



}
